using Microsoft.AspNetCore.Mvc.Filters;

namespace SecondDemo.API.Filters;

public class CustomActionFilterAttribute : Attribute, IActionFilter
{
    private readonly ILogger<CustomActionFilterAttribute> _logger;

    public CustomActionFilterAttribute(ILogger<CustomActionFilterAttribute> logger)
    {
        _logger = logger;
    }
    void IActionFilter.OnActionExecuted(ActionExecutedContext context)
    {
        // throw new NotImplementedException();
    }

    void IActionFilter.OnActionExecuting(ActionExecutingContext context)
    {
        _logger.LogInformation("AA");
    }
}
